<?php

	// +----------------------------------------------------------------------
	// | api模块认证中间件
	// +----------------------------------------------------------------------
	// | Copyright (c) 2015-2024 http://www.yicmf.com, All rights reserved.
	// +----------------------------------------------------------------------
	// | Author: 微尘 <yicmf@qq.com>
	// +----------------------------------------------------------------------

	namespace app\middleware\api;

    class Auth
	{

		public function handle($request, \Closure $next)
		{
//            if (is_null($request->header('cloud-token'))) {
//                abort(200, '不可操作');
//            } else {

//            $re = UserEvent::getInfoByToken($request->header('Authori-zation'), 'api');
//            if ($re['code'] == 0) {
//                $request->user = $re['data'];
//            }
			$response = $next($request);
			// 添加中间件执行代码
			return $response;
//            }
		}
	}